package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(50)"`
	Password string `gorm:"type:varchar(50)"`
}
type UserRole struct {
	gorm.Model
	Uid int `gorm:"type:varchar(50)"`
	Rid int `gorm:"type:varchar(50)"`
}

type Role struct {
	gorm.Model
	ROleName string `gorm:"type:varchar(50)"`
}
type RoleNode struct {
	gorm.Model
	Nid int `gorm:"type:varchar(50)"`
	Rid int `gorm:"type:varchar(50)"`
}

type Node struct {
	gorm.Model
	NodeName string `gorm:"type:varchar(50)"`
}

type Car struct {
	gorm.Model
	CarName  string `gorm:"type:varchar(50)"`
	CarType  string `gorm:"type:varchar(50)"`
	CarPrice string `gorm:"type:varchar(50)"`
}

type Order struct {
	gorm.Model
	OrderCode string `gorm:"type:varchar(50)"`
	OrderFh   string `gorm:"type:varchar(50)"`
	OrderSh   string `gorm:"type:varchar(50)"`
	Cid       int    `gorm:"type:int"`
}

type CarOrderList struct {
	OrderId   int    `gorm:"type:int"`
	CarName   string `gorm:"type:varchar(50)"`
	CarType   string `gorm:"type:varchar(50)"`
	CarPrice  string `gorm:"type:varchar(50)"`
	OrderCode string `gorm:"type:varchar(50)"`
	OrderFh   string `gorm:"type:varchar(50)"`
	OrderSh   string `gorm:"type:varchar(50)"`
}
